#ifndef __Solver_h
#define __Solver_h

#include "systemvector.h"
#include "mesh.h"
#include "probleminterface.h"
#include  <fstream>

/*----------------------------------------------------------*/

class IntegrationFormulaBase;

class Solver
{
protected:
  int _degre;
  const IntegrationFormulaBase* _IF;

public:
  Solver(int degre);
  void initialCondition(SystemVector& u, const ProblemInterface* problem, const Mesh& mesh) const;
  void computeResidual(SystemVector& f, const SystemVector& u, const ProblemInterface* problem, const Mesh& mesh) const;
  void writeSolution(std::string filename, const double& time, const SystemVector& u, const ProblemInterface* problem, const Mesh& mesh) const;
  void writeSolution(std::string filename, const SystemVector& u, const ProblemInterface* problem, const Mesh& mesh) const;
};

#endif
